package com.jubaopen.dao.ibatis;

import com.jubaopen.bean.FirmInfo;
import com.jubaopen.dao.FirmInfoDAO;

public class FirmInfoDAOImpl extends BaseIBatisDao implements FirmInfoDAO {

	@Override
	public int add(FirmInfo firmInfo) {
		return (Integer) this.getSqlMapClientTemplate().insert(
				"FirmInfoMapper.insert", firmInfo);
	}

	@Override
	public int update(FirmInfo firmInfo) {
		return this.getSqlMapClientTemplate().update("FirmInfoMapper.update",
				firmInfo);
	}

	@Override
	public FirmInfo getByUserId(int userId) {
		return (FirmInfo) this.getSqlMapClientTemplate().queryForObject(
				"FirmInfoMapper.getByUserId", userId);
	}

}
